/**
 * 
 */
package com.comDef.gui.main;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;

import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.event.MenuEvent;
import javax.swing.event.MenuListener;

/**
 * @author rrodzinski
 *
 */
public class MainMenu extends JMenuBar implements ActionListener{
	JMenu menu;
	
	public MainMenu(){
		super();
		createMenu();
	}
	
	public void createMenu(){
		JMenuItem menuItem;	
		menu = new JMenu("File");
		menu.setMnemonic(KeyEvent.VK_F);
		menu.getAccessibleContext().setAccessibleDescription("");
		
		menuItem = new JMenuItem("New Game");
		menuItem.setMnemonic(KeyEvent.VK_N);
		menuItem.getAccessibleContext().setAccessibleDescription("");
		menuItem.addActionListener(this);
		menu.add(menuItem);	
		menu.addActionListener(this);
		this.add(menu);
		
		menu = new JMenu("Help");
		menuItem = new JMenuItem("About");
		menuItem.setMnemonic(KeyEvent.VK_A);
		menu.add(menuItem);
		this.add(menu);
		menuItem = new JMenuItem("About");
		menuItem.setMnemonic(KeyEvent.VK_G);
		menuItem.addActionListener(this);
		this.add(menuItem);
		
	}

	public void actionPerformed(ActionEvent e) {
		System.out.println("Selected: " + e.getActionCommand());
		
	}

	
}
